import uploadRequest from "@/api/backend/base/upload.js";

export function uploadChunk(fileMD5,currentIndex,formData){
    return uploadRequest.upload(`/upload/chunk/${fileMD5}/${currentIndex}`,formData)
}

export function uploadChunkByChunkMD5(chunkMD5,formData){
    return uploadRequest.upload(`/upload/chunk/${chunkMD5}`,formData)
}

export function mergeChunk(fileMD5,num,suffix){
    return uploadRequest.get(`/upload/mergeChunk/${fileMD5}/${num}?suffix=${suffix}`)
}
export function mergeChunkByChunkMD5(chunkMD5s,fileMD5,suffix){
    return uploadRequest.post(`/upload/mergeChunk/${fileMD5}?suffix=${suffix}`,chunkMD5s)
}